package com.mida.dms.knw.entity;

import java.io.Serializable;
import java.util.Date;


import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * 引用体系和编码体系的关系表
 * @author conyfrommars
 *
 */
@Setter
@Getter
public class CitationCitationRelation implements Serializable {

	/**
	 * 引用体系编码体系关系表ID
	 */
	@ApiModelProperty(value = "主键", required = false)
	@JsonSerialize(using= com.fasterxml.jackson.databind.ser.std.ToStringSerializer.class)
	private Long citationRelationSoid;

    /**
     * 编码体系ID
     */
	@ApiModelProperty(value = "编码体系ID", required = true)
	@JsonSerialize(using= com.fasterxml.jackson.databind.ser.std.ToStringSerializer.class)
    private Long derailCodingSystemSoid;

    /**
     * 引用体系ID
     */
	@ApiModelProperty(value = "引用体系ID", required = true)
	@JsonSerialize(using= com.fasterxml.jackson.databind.ser.std.ToStringSerializer.class)
    private Long citationSystemSoid;

	 /**
     * 删除标志位
     */
	@ApiModelProperty(value = "删除标志位，默认0", required = false)
	@JsonSerialize(using= com.fasterxml.jackson.databind.ser.std.ToStringSerializer.class)
    protected Long isDelete=0L;

	 /**
     * 创建日期时间
     */
	@ApiModelProperty(value = "创建日期时间", dataType = "java.util.Date",required = false,example = "2021-01-26")
    protected Date createDate; 
    
    /**
     * 最后更新日期时间
     */
	@ApiModelProperty(value = "最后更新日期时间", dataType = "java.util.Date",required = false,example = "2021-01-26")
    protected Date updateDate;

    /**
     * 最后修改人
     */
	@ApiModelProperty(value = "最后修改人", required = false)
	@JsonSerialize(using= com.fasterxml.jackson.databind.ser.std.ToStringSerializer.class)
    protected Long updateUser;

    private static final long serialVersionUID = 1L;

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((citationRelationSoid == null) ? 0 : citationRelationSoid.hashCode());
		result = prime * result + ((citationSystemSoid == null) ? 0 : citationSystemSoid.hashCode());
		result = prime * result + ((derailCodingSystemSoid == null) ? 0 : derailCodingSystemSoid.hashCode());
		result = prime * result + ((isDelete == null) ? 0 : isDelete.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CitationCitationRelation other = (CitationCitationRelation) obj;
		if (citationRelationSoid == null) {
			if (other.citationRelationSoid != null)
				return false;
		} else if (!citationRelationSoid.equals(other.citationRelationSoid))
			return false;
		if (citationSystemSoid == null) {
			if (other.citationSystemSoid != null)
				return false;
		} else if (!citationSystemSoid.equals(other.citationSystemSoid))
			return false;
		if (derailCodingSystemSoid == null) {
			if (other.derailCodingSystemSoid != null)
				return false;
		} else if (!derailCodingSystemSoid.equals(other.derailCodingSystemSoid))
			return false;
		if (isDelete == null) {
			if (other.isDelete != null)
				return false;
		} else if (!isDelete.equals(other.isDelete))
			return false;
		return true;
	}




}